﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using YasharEl.Infrastructure.ApplicationModel.Bootstrap.Extensibility;
using YasharEl.Infrastructure.ApplicationModel.Bootstrap.Behavior;
using YasharEl.Infrastructure.ApplicationModel.Bootstrap.Reporting;
using YasharEl.Infrastructure.ApplicationModel.Bootstrap.Execution;

namespace YasharEl.Infrastructure.ApplicationModel.Bootstrap.Syntax
{
    /// <summary>
    /// Executable definition. The executable is part of a syntax.
    /// </summary>
    /// <typeparam name="TExtension">The type of the extension.</typeparam>
    public interface IExecutable<TExtension> : IBehaviorAware<TExtension> , IDescribable
        where TExtension : IBootstrappingExtension
    {
        /// <summary>
        /// Executes an operation on the specified extensions.
        /// </summary>
        /// <param name="extensions">The extensions.</param>
        /// <param name="executableContext">The executable context which is used for reporting</param>
        void Execute(IEnumerable<TExtension> extensions, IExecutableContext executableContext);
    }
}
